package com.zcfeng.ischool;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.webkit.WebView;
import android.widget.TextView;
import bean.Articlebean;

public class TextActivity extends Activity {

	private WebView wv;
	private Articlebean art;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_article_style);
		initdata();
		initview();
	}
	private void initdata() {
		Intent intent=getIntent();
		art = (Articlebean) intent.getSerializableExtra("article");
	}
	private void initview() {
		TextView tv=(TextView) findViewById(R.id.wv_title);
		tv.setText("标题："+art.getTitle());
		wv = (WebView) findViewById(R.id.articleweb);
		wv.getSettings().setJavaScriptEnabled(true);
		//加载需要显示的网页
		wv.loadUrl("http://www.cfeng8.com/Ischool/index.php/article/article/id/"+art.getId());
	}
	public void back(View v){
		finish();
	}

}
